import request from './request'


// 管理我们的这些接口

// 首页数据的请求
export const GetHomeList = () => request.get('/index/index')
// 获取搜索弹出框的数据
export const GetSearchPopupData = () => request.get('/search/index')

// 获取实时搜索的文本提示的数据列表(get传入一个对象作为参数)
export const GetSearchTipsListData = (params) => request.get("/search/helper", { params });
// export const GetSearchTipsListData = (params) => request.post("/search/helper",params);

// 获取搜索商品列表的数据
export const GetGoodsListData = (params) => request.get('/goods/list', { params })

// 清除历史记录
export const ClearHistory = () => request.get('/search/clearhistory')

// 登录请求(post请求传入参数不需要花括号)
export const GoLogin = (params) => request.post('/auth/loginByWeb', params)

// 商品详情
export const GetGoodsDetailData = (params) => request.get('/goods/detail', { params })

// 相关商品
export const GetGoodsRelatedData = (params) => request.get('/goods/related', {params})